import request from '@/utils/request'
import type { BulletPaywageUserDto, BulletWorkUserDto } from './types'
import type { PageDto, PageReqDto } from '../types'
/**
 * 获取c端职工列表
 * @param params 
 * @returns 
 */
export function getBulletWorklUserList(params: PageReqDto & {
    idCardNo?: string
    phone?: string
    isDelete: number
}): Promise<PageDto<BulletWorkUserDto>> {
    return request.get('/crm-prod/blue/user/list', {
        params
    })
}

/**
 * c端员工注销
 * @param params 
 * @returns 
 */
export function bulletWorkCancellation(data: BulletWorkUserDto): Promise<void> {
    return request.put('/crm-prod/blue/user/logout', data)
}

/**
 * c端员工修改身份证照片
 * @param data 
 * @returns 
 */
export function updateBulletWorkIdCardPhoto(data: {
    id: number
    ownIdCardFront: string
    ownIdCardBack: string
}): Promise<void> {
    return request.put('/crm-prod/blue/user/updateIdCardPhoto', data)
}

/**
 * 获取b端员工列表
 * @param params 
 * @returns 
 */
export function getBulletPaywagelUserList(params: PageReqDto & {
    phone?: string
}): Promise<PageDto<BulletPaywageUserDto>> {
    return request.get('/crm-prod/pay/pay-manager-user/query-member-list', {
        params
    })
}
